package com.ddwl.goods.dao.mapper;

import com.ddwl.common.dao.mapper.TkMapper;
import com.ddwl.goods.dto.ItemDiscountDto;
import com.ddwl.goods.dao.model.Discount;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface DiscountMapper extends TkMapper<Discount> {

    /**
     * 查询商品减免折扣信息(旧)
     * @param itemIds
     * @return
     */
    public List<ItemDiscountDto> findItemDiscount(@Param("itemIds") Set<String> itemIds);

    /**
     * 查询商品减免折扣信息（新）
     * @param itemIds
     */
    public List<ItemDiscountDto> findItemDiscountNew(@Param("itemIds")Set<String> itemIds);

    public void deleteByActivityId(@Param("activityId")String activityId);

    List<Discount> selectByActivityId(@Param("activityId")String activityId);
}
